using System;
using InfoTech.Core.Data.SqlClient;
using InfoTech.Core.Service;
using InfoTech.LanTranh.MucVu.Bussiness;

namespace InfoTech.LanTranh.MucVu.Service
{
    public class EXCEPTIONService : BaseService
    {
        public static EXCEPTION GetException(string id)
        {
            Guid guid;
            if (Guid.TryParse(id, out guid))
            {
                EXCEPTION exception = new EXCEPTION();
                exception.EXCEPTIONID = guid;
                exception.SelectbyId();
                if (exception.IsPersistence)
                {
                    exception.DeletebyId();
                    return exception;
                }

            }
            return null;
        }
    }
}
